<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Dynamic dataTable creation test page</title>
        <!--
            Fixes for primefaces 3.0-m1/m2
        -->
        <script type="text/javascript" src="jscript/tree.js"></script>
        <script type="text/javascript" src="jscript/datatable.js"></script>
    </h:head>
    <f:view contentType="text/html">
        <h:body>
            <p:growl/>

            <h:form id="chooseForm">
                <p:toolbar>
                    <p:toolbarGroup>
                        <p:commandButton image="ui-icon ui-icon-search" 
                                         update=":carForm"
                                         action="#{cars.buildCarsPanel}"/>
                        <p:menuButton>
                            
                        </p:menuButton>
                    </p:toolbarGroup>
                </p:toolbar>
            </h:form>

            <h:form id="carForm">
                <h:panelGrid columns="1" style="width:100%">
                    <p:panel style="width:100%" binding="#{cars.carsLazyPanel}" >
                        <f:facet name="header">
                            lazy table panel
                        </f:facet>
                    </p:panel>

                    <p:panel style="width:100%" binding="#{cars.carsPanel}" >
                        <f:facet name="header">
                            Not lazy table model
                        </f:facet>
                    </p:panel>

                    <p:tabView activeIndex="0">
                        <p:tab title="basic information">
                            <p:panel binding="#{cars.basePanel}"/>
                        </p:tab>

                        <p:tab title="Attributes">
                            <p:panel binding="#{cars.attrPanel}"/>
                        </p:tab>
                    </p:tabView>
                </h:panelGrid>
            </h:form>
        </h:body>
    </f:view>
</html>

